package com.github.data_manage

import com.github.data_manage.controller.FundMeetingController
import com.github.data_manage.dao.FundDao
import com.github.data_manage.dao.FundMeetingDao
import org.junit.jupiter.api.Test
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest

@SpringBootTest(classes = [DataManageApplication::class], webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
class FundMeetingEmailTest {

    @Autowired
    lateinit var fundMeetingController: FundMeetingController

    @Autowired
    lateinit var fundDao: FundDao

    @Autowired
    lateinit var fundMeetingDao: FundMeetingDao

    @Test
    fun sendMeetingEmailTest(){
        val fund = fundDao.findById(2103).orElseThrow()
        val fundMeeting = fundMeetingDao.findById(502).orElseThrow()
        fundMeetingController.sendEmail(fund, fundMeeting)
    }
}
